<%-- 
    Document   : addnewuse
    Created on : Dec 14, 2009, 3:20:35 PM
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Add New User</title>
    </head>
    <body>
        <form name="form1" method="post" action="sgt.onlinetest.controller/AddNewUser">
          <table width="452" border="1">
            <tr>
              <td colspan="2"><blockquote>
                  <blockquote>
                    <blockquote>
                      <p><strong>Create New Account</strong></p>
                    </blockquote>
                  </blockquote>
              </blockquote></td>
            </tr>
            <tr>
              <td width="77"><div align="right">Username:</div></td>
              <td width="359"><label>
                <input name="tbxusername" type="text" id="tbxusername" size="35" />
              </label></td>
            </tr>
            <tr>
              <td><div align="right">Password:</div></td>
              <td><label>
                <input name="tbxpassword" type="text" id="tbxpassword" size="35" />
              </label></td>
            </tr>
            <tr>
              <td><div align="right">Fullname:</div></td>
              <td><label>
                <input name="tbxfullname" type="text" id="tbxfullname" size="35" />
              </label></td>
            </tr>

            <tr>
              <td><div align="right">Role:</div></td>
               <jsp:useBean id="users" class="java.util.List<sgt.onlinetest.entity.User>" scope="request"/>
                             <td>
                <% for (sgt.onlinetest.entity.User u : users) {%>
                <select name="cbxrole" id="cbxrole">
                <option>Select Role</option>
                <% for (sgt.onlinetest.entity.Role r : u.getRoles()) {%>
                <option value="<%=r.getAutoId()%>"><%=r.getName()%></option><%}%>
                                </select>
                                <%}%>
              </td>
            </tr>

            <tr>
                      <jsp:useBean id="msg" scope="request" class="String"/>
              <td colspan="2"><div>${msg}</div></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><label>
                <input type="submit" name="btncreate" id="btncreate" value="Create" />
                <input type="reset" name="btnreset" id="btnreset" value="Reset" />
              </label></td>
            </tr>
          </table>
    </form>
        <h1>&nbsp;</h1>
</body>
</html>
